<template>
  <!-- 劳务派遣页面 -->
  <div>
    <div class="enterpriseInfoTab">
      <ul>
        <li>
          <a
            @click="
              recruit(
                '/dlyrl/hr/recruitmentinformation/RecruitmentInformationList'
              )
            "
          >
            招聘信息
          </a>
        </li>
        <li>
          <a
            @click="
              recruit(
                '/dlyrl/hr/recruitmentinformation/RecruitmentInformationList?type=' +
                  0
              )
            "
          >
            普通招聘
          </a>
        </li>
        <li>
          <a
            @click="
              recruit(
                '/dlyrl/hr/recruitmentinformation/RecruitmentInformationList?type=' +
                  1
              )
            "
          >
            自主招聘
          </a>
        </li>
        <li>
          <a
            @click="
              recruit(
                '/dlyrl/hr/agencyrecruitment/AgencyRecruitmentInformationList'
              )
            "
          >
            代理招聘
          </a>
        </li>
        <li class="defaultActive">
          <a
            @click="recruit('/dlyrl/hr/laborDispatching/laborDispatchingList')"
          >
            劳务派遣
          </a>
        </li>
      </ul>
    </div>
    <div style="background-color: #fff; padding: 10px">
      <div class="contentsTop">
        <!-- 上半内容五个按钮 -->
        <div>
          <el-button
            type="primary"
            size="small"
            icon="el-icon-circle-plus-outline"
            @click="laborDispatchingDialog"
            >添加</el-button
          >
          <el-button
            type="success"
            size="small"
            icon="el-icon-edit"
            @click="redactLaborDispatching"
            :disabled="recruitCheckArray.length != 1"
            >编辑</el-button
          >
          <el-button
            type="danger"
            size="small"
            icon="el-icon-delete"
            @click="lookOverLaborDispatchingsDel"
            :disabled="recruitCheckArray.length <= 0"
            >删除</el-button
          >
          <!-- <el-button
            size="small"
            icon="el-icon-search"
            @click="lookOverLaborDispatching"
            :disabled="recruitCheckArray.length != 1"
            >查看</el-button
          > -->
          <el-button
            size="small"
            icon="el-icon-circle-close"
            @click="toggleTopSelection()"
            >取消</el-button
          >
        </div>
        <!-- 劳务派遣信息表格 -->
        <el-table
          :data="laborDispatchingTable"
          ref="laborDispatchingTable"
          :cell-style="cellStyle"
          style="border: 1px solid #d6cfe2; margin-top: 20px; min-height: 350px"
          size="small"
          :header-cell-class-name="cellHeadStyle"
          :row-class-name="tableRowClassName"
          height="calc(100% - 80px)"
          row-key="id"
          :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
          @selection-change="laborDispatchingChange"
          v-loading="laborDispatchingLoading"
        >
          <el-table-column fixed type="selection" width="55" align="center"></el-table-column>
          <el-table-column
            prop="enterpriseInformation.companyName"
            label="企业"
            fixed="left"
            width="230"
            show-overflow-tooltip
          >
            <template slot-scope="scope">
              <el-link  type="primary" :underline="false"   @click="lookOverLaborDispatching(scope.row)">{{scope.row.enterpriseInformation.companyName}}</el-link>
            </template>
          </el-table-column>
          <el-table-column
            prop="jobtype.name"
            label="岗位类型"
            width="100"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="positionName"
            label="岗位名称"
            width="100"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="monthlyWage"
            label="月用工资"
            width="100"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="recruitingNumbers"
            label="招聘人数"
            width="100"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="sex"
            label="性别"
            align="center"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="age"
            label="年龄"
            align="center"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="workAddress"
            label="工作地址"
            width="230"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="workTime"
            label="工作时间"
            width="160"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="workexperience"
            label="工作经验(年限)"
            width="140"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="jobDescription"
            label="岗位描述"
            width="100"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="gradeRatings"
            label="等级评级"
            width="100"
            show-overflow-tooltip
          > 
            <template slot-scope="scope">
                  {{ $dictUtils.getDictLabel("grade_ratings", scope.row.gradeRatings, '-') }}
            </template>
          </el-table-column>
          <el-table-column
            prop="otherRecruitmentRequirements"
            label="其他招聘条件"
            width="200"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="education"
            label="学历"
            width="100"
            show-overflow-tooltip
          >
            <template slot-scope="scope">
                {{ $dictUtils.getDictLabel("nature", scope.row.education, '-') }}
            </template>
          </el-table-column>
          <el-table-column
            prop="award"
            label="奖励金额"
            width="100"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="groupleader.name"
            label="组长"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="groupLeaderDistributionRatio"
            label="组长分配比例(%)"
            width="160"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="postcollector.name"
            label="岗位收集员"
            width="110"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="postcollectorDistributionRatio"
            label="岗位收集员分配比例(%)"
            width="200"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="negotiation.name"
            label="商机洽谈员"
            width="110"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="negotiationDistributionRatio"
            label="商机洽谈员分配比例(%)"
            width="200"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="recruitment.name"
            label="招聘/面试员"
            width="110"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="recruitmentDistributionRatio"
            label="招聘/面试员分配比例(%)"
            width="200"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="businessNegotiation.name"
            label="人才安排员"
            width="110"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="businessNegotiationDistributionRatio"
            label="人才安排员分配比例(%)"
            width="200"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="remarks"
            label="备注信息"
            width="150"
            show-overflow-tooltip
          ></el-table-column>
        </el-table>
        <el-pagination
          @size-change="laborDispatchingHandleSize"
          @current-change="laborDispatchingHandleCurrent"
          :current-page.sync="laborDispatchingPageNo"
          :page-size="laborDispatchingPageSize"
          layout="total, prev, pager, next, jumper"
          :total="laborDispatchingTotal"
          style="margin: 1rem 0"
        >
        </el-pagination>
      </div>

      <!-- 添加劳务派遣信息页面 -->
      <div>
        <el-dialog
          title="添加劳务派遣信息"
          width="60%"
          :visible.sync="addLaborDispatchingDialog"
        >
          <el-form
            ref="laborDispatchings"
            :model="laborDispatchings"
            class="addEnterpriseRecruitment"
          >
            <el-row>
              <el-col :span="6">
                <el-form-item
                  prop="companyName"
                  size="small"
                  label="企业"
                  :label-width="formLabelWidth"
                  :rules="[
                    { required: true, message: '请选择企业', trigger: 'blur' },
                  ]"
                >
                  <el-select
                    v-model="laborDispatchings.companyName"
                    placeholder="请选择"
                    size="small"
                    @change="changeCompanyName"
                  >
                    <el-option
                      v-for="item in getCompanyName"
                      :key="item.id"
                      :label="item.companyName"
                      :value="item.id"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="companyUser"
                  label="企业用户"
                  size="small"
                  :label-width="formLabelWidth"
                  :rules="[
                    {
                      required: true,
                      message: '请选择企业用户',
                      trigger: 'blur',
                    },
                  ]"
                >
                  <el-select
                    v-model="laborDispatchings.companyUser"
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="item in getCompanyUser"
                      :key="item.id"
                      :label="item.userName"
                      :value="item.id"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="jobtypeName"
                  label="岗位类型 "
                  size="small"
                  :label-width="formLabelWidth"
                  :rules="[
                    {
                      required: true,
                      message: '请选择岗位类型',
                      trigger: 'blur',
                    },
                  ]"
                >
                  <el-select
                    v-model="laborDispatchings.jobtypeName"
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="item in getJobtypeName"
                      :key="item.id"
                      :label="item.name"
                      :value="item.id"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="companyName"
                  size="small"
                  label="派遣公司"
                  :label-width="formLabelWidth"
                  :rules="[
                    {
                      required: true,
                      message: '请选择派遣公司',
                      trigger: 'blur',
                    },
                  ]"
                >
                  <el-select
                    v-model="laborDispatchings.sendEnterprise"
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="item in getCompanyName"
                      :key="item.id"
                      :label="item.companyName"
                      :value="item.id"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="6" class="cleanPadding">
                <el-form-item
                  prop="age"
                  label="年龄"
                  size="small"
                  :label-width="formLabelWidth"
                >
                  <el-input
                    v-model="laborDispatchings.addAge1"
                    autocomplete="off"
                    style="width: 40%"
                    maxlength="2"
                  ></el-input>
                  ~
                  <el-input
                    v-model="laborDispatchings.addAge2"
                    autocomplete="off"
                    style="width: 40%"
                    maxlength="2"
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="recruitingNumbers"
                  size="small"
                  label="招聘人数"
                  :label-width="formLabelWidth"
                  :rules="[
                    {
                      required: true,
                      message: '请输入招聘人数',
                      trigger: 'blur',
                      pattern: /^[0-9]{1,6}$/,
                    },
                  ]"
                >
                  <el-input
                    v-model="laborDispatchings.recruitingNumbers"
                    autocomplete="off"
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6" class="cleanPadding">
                <el-form-item
                  prop="monthlyWage"
                  size="small"
                  label="月用工工资"
                  :label-width="formLabelWidth"
                >
                  <el-input
                    v-model="laborDispatchings.addMonthlyWage1"
                    autocomplete="off"
                    style="width: 35%"
                    maxlength="4"
                  ></el-input>
                  -
                  <el-input
                    v-model="laborDispatchings.addMonthlyWage2"
                    autocomplete="off"
                    style="width: 35%"
                    maxlength="4"
                  ></el-input
                  ><span style="margin-left: 5px">(k)</span>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="positionName"
                  label="岗位名称"
                  size="small"
                  :label-width="formLabelWidth"
                  :rules="[
                    {
                      required: true,
                      message: '请输入岗位名称',
                      trigger: 'blur',
                    },
                  ]"
                >
                  <el-input
                    v-model="laborDispatchings.positionName"
                    autocomplete="off"
                  ></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="8">
                <el-form-item
                  prop="sex"
                  label="性别"
                  size="small"
                  :label-width="formLabelWidth"
                  :rules="[
                    { required: true, message: '请选择性别', trigger: 'blur' },
                  ]"
                >
                  <el-radio v-model="laborDispatchings.sex" label="男"
                    >男</el-radio
                  >
                  <el-radio v-model="laborDispatchings.sex" label="女"
                    >女</el-radio
                  >
                  <el-radio v-model="laborDispatchings.sex" label="男女不限"
                    >男女不限</el-radio
                  >
                </el-form-item>
              </el-col>
              <el-col :span="10">
                <el-form-item
                  prop="workTime"
                  size="small"
                  label="工作时间"
                  :label-width="formLabelWidth"
                  :rules="[
                    {
                      required: true,
                      message: '请选择工作时间段',
                      trigger: 'blur',
                    },
                  ]"
                >
                  <el-time-picker
                    is-range
                    format="HH:mm"
                    style="width: 95%"
                    value-format="HH:mm"
                    v-model="laborDispatchings.workTime"
                    range-separator="-"
                    start-placeholder="开始时间"
                    end-placeholder="结束时间"
                    placeholder="选择时间范围"
                  >
                  </el-time-picker>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  label="学历"
                  size="small"
                  :label-width="formLabelWidth"
                  prop="education"
                  :rules="[
                    { required: true, message: '请选择学历', trigger: 'blur' },
                  ]"
                >
                  <el-select
                    v-model="laborDispatchings.education"
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="item in $dictUtils.getDictList('nature')"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="18">
                <el-form-item
                  prop="workAddress"
                  label="工作地址"
                  size="small"
                  :label-width="formLabelWidth"
                  :rules="[
                    {
                      required: true,
                      message: '请输入工作地址',
                      trigger: 'blur',
                    },
                  ]"
                >
                  <el-input
                    v-model="laborDispatchings.workAddress"
                    autocomplete="off"
                    style="width: 97.5%"
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  label="等级评级"
                  size="small"
                  :label-width="formLabelWidth"
                  prop="gradeRatings"
                  :rules="[
                    {
                      required: true,
                      message: '请选择等级评级',
                      trigger: 'blur',
                    },
                  ]"
                >
                  <el-select
                    v-model="laborDispatchings.gradeRatings"
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="item in $dictUtils.getDictList('grade_ratings')"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-form-item
                prop="jobDescription"
                label="岗位描述"
                :label-width="formLabelWidth"
                size="small"
                :rules="[
                  {
                    required: true,
                    message: '请输入岗位描述',
                    trigger: 'blur',
                  },
                ]"
              >
                <el-input
                  v-model="laborDispatchings.jobDescription"
                  autocomplete="off"
                  style="width: 98.2%"
                  type="textarea"
                ></el-input>
              </el-form-item>
            </el-row>
            <el-row>
              <el-form-item
                prop="otherRecruitmentRequirements"
                size="small"
                label="招聘条件"
                :label-width="formLabelWidth"
                :rules="[
                  {
                    required: true,
                    message: '请输入招聘条件',
                    trigger: 'blur',
                  },
                ]"
              >
                <el-input
                  v-model="laborDispatchings.otherRecruitmentRequirements"
                  autocomplete="off"
                  style="width: 98.2%"
                ></el-input>
              </el-form-item>
            </el-row>
            <el-row>
              <el-col :span="6">
                <el-form-item
                  prop="workExperience"
                  label="工作经验(年限)"
                  size="small"
                  :label-width="formLabelWidth"
                  :rules="[
                    {
                      required: true,
                      message: '请输入工作年限',
                      trigger: 'blur',
                      pattern: /^[0-9]{1,2}$/,
                    },
                  ]"
                >
                  <el-input
                    v-model="laborDispatchings.workExperience"
                    autocomplete="off"
                    maxlength="2"
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="award"
                  label="奖励金额"
                  size="small"
                  :label-width="formLabelWidth"
                  :rules="[
                    {
                      required: true,
                      message: '请输入奖励金额',
                      trigger: 'blur',
                      pattern: /^[0-9]{1,8}$/,
                    },
                  ]"
                >
                  <el-input
                    v-model="laborDispatchings.award"
                    autocomplete="off"
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="groupleaderName"
                  size="small"
                  label="组长"
                  :label-width="formLabelWidth"
                >
                  <el-select
                    v-model="laborDispatchings.groupleaderName"
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="item in getUsers"
                      :key="item.id"
                      :label="item.name"
                      :value="item.id"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="groupLeaderDistributionRatio"
                  size="small"
                  label="组长分配比例(%)"
                  :label-width="formLabelWidth"
                >
                  <el-input
                    v-model="laborDispatchings.groupLeaderDistributionRatio"
                    autocomplete="off"
                    maxlength="3"
                  ></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="6">
                <el-form-item
                  prop="postcollectorName"
                  label="岗位收集员"
                  size="small"
                  :label-width="formLabelWidth"
                >
                  <el-select
                    v-model="laborDispatchings.postcollectorName"
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="item in getUsers"
                      :key="item.id"
                      :label="item.name"
                      :value="item.id"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="postcollectorDistributionRatio"
                  size="small"
                  label="岗位收集员分配比例(%)"
                  :label-width="formLabelWidth"
                >
                  <el-input
                    v-model="laborDispatchings.postcollectorDistributionRatio"
                    autocomplete="off"
                    maxlength="3"
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="negotiationName"
                  label="商机洽谈员"
                  size="small"
                  :label-width="formLabelWidth"
                >
                  <el-select
                    v-model="laborDispatchings.negotiationName"
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="item in getUsers"
                      :key="item.id"
                      :label="item.name"
                      :value="item.id"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="negotiationDistributionRatio"
                  size="small"
                  label="商机洽谈员分配比例(%)"
                  :label-width="formLabelWidth"
                >
                                 <!-- :rules="[
                    {
                      required: true,
                      message: '请输入分配比例',
                      trigger: 'blur',
                      pattern: /^[0-9]{1,3}$/,
                    },
                  ]" -->
                  <el-input
                    v-model="laborDispatchings.negotiationDistributionRatio"
                    autocomplete="off"
                    maxlength="3"
                  ></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="6">
                <el-form-item
                  prop="recruitmentName"
                  label="招聘/面试员"
                  size="small"
                  :label-width="formLabelWidth"
                >
                  <el-select
                    v-model="laborDispatchings.recruitmentName"
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="item in getUsers"
                      :key="item.id"
                      :label="item.name"
                      :value="item.id"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="recruitmentDistributionRatio"
                  size="small"
                  label="招聘/面试员分配比例(%)"
                  :label-width="formLabelWidth"                 
                >
                  <el-input
                    v-model="laborDispatchings.recruitmentDistributionRatio"
                    autocomplete="off"
                    maxlength="3"
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="businessNegotiationName"
                  size="small"
                  label="人才安排员"
                  :label-width="formLabelWidth"
                >
                  <el-select
                    v-model="laborDispatchings.businessNegotiationName"
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="item in getUsers"
                      :key="item.id"
                      :label="item.name"
                      :value="item.id"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="businessNegotiationDistributionRatio"
                  size="small"
                  label="人才安排员分配比例(%)"
                  :label-width="formLabelWidth"
                >
                  <el-input
                    v-model="
                      laborDispatchings.businessNegotiationDistributionRatio
                    "
                    autocomplete="off"
                    maxlength="3"
                  ></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="6">
                <el-form-item
                  label="融资阶段"
                  size="small"
                  :label-width="formLabelWidth"
                  prop="financingstage"
                  :rules="[
                    {
                      required: true,
                      message: '请选择融资阶段',
                      trigger: 'blur',
                    },
                  ]"
                >
                  <el-select
                    v-model="laborDispatchings.financingstage"
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="item in $dictUtils.getDictList('financing_stage')"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  label="公司规模"
                  size="small"
                  :label-width="formLabelWidth"
                  prop="companysize"
                  :rules="[
                    {
                      required: true,
                      message: '请选择公司规模',
                      trigger: 'blur',
                    },
                  ]"
                >
                  <el-select
                    v-model="laborDispatchings.companysize"
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="item in $dictUtils.getDictList('ccompany_size')"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col>
                <el-form-item
                  prop="like"
                  label="福利"
                  size="small"
                  :label-width="formLabelWidth"
                  :rules="[
                    { required: true, message: '请选择福利', trigger: 'blur' },
                  ]"
                >
                  <el-checkbox-group v-model="laborDispatchings.socialBenefits">
                    <el-checkbox
                      v-for="item in getWelfare"
                      :label="item.id"
                      :key="item.id"
                      :value="item.id"
                      >{{ item.title }}</el-checkbox
                    >
                  </el-checkbox-group>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-form-item
                prop="remarks"
                label="备注"
                size="small"
                :label-width="formLabelWidth"
              >
                <el-input
                  v-model="laborDispatchings.remarks"
                  autocomplete="off"
                  style="width: 98.2%"
                ></el-input>
              </el-form-item>
            </el-row>
          </el-form>
          <div slot="footer" class="dialog-footer">
            <el-button @click="addCancelLaborDispatching"  size="small">取 消</el-button>
            <el-button type="primary" @click="confirmAddLaborDispatching"  size="small"
              >确 定</el-button
            >
          </div>
        </el-dialog>
      </div>

      <!-- 编辑劳务派遣信息页面 -->
      <div>
        <el-dialog
          title="修改劳务派遣信息"
          width="60%"
          :visible.sync="redactLaborDispatchingDialog"
        >
          <el-form
            ref="redactLaborDispatchings"
            :model="redactLaborDispatchings"
            class="addEnterpriseRecruitment"
          >
            <el-row>
              <el-col :span="6">
                <el-form-item
                  prop="enterpriseInformation.companyName"
                  size="small"
                  label="企业"
                  :label-width="formLabelWidth"
                >
                  <el-input
                    v-model="
                      redactLaborDispatchings.enterpriseInformation.companyName
                    "
                    autocomplete="off"
                    disabled
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="enterpriseUserInformation.userName"
                  label="企业用户"
                  size="small"
                  :label-width="formLabelWidth"
                >
                  <el-input
                    v-model="
                      redactLaborDispatchings.enterpriseUserInformation.userName
                    "
                    autocomplete="off"
                    disabled
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="jobtype.name"
                  label="岗位类型 "
                  size="small"
                  :label-width="formLabelWidth"
                  :rules="[
                    {
                      required: true,
                      message: '请选择岗位类型',
                      trigger: 'blur',
                    },
                  ]"
                >
                  <el-select
                    v-model="redactLaborDispatchings.jobtype.name"
                    placeholder="请选择"
                    @change="redactChangeJobtypeName"
                  >
                    <el-option
                      v-for="item in getJobtypeName"
                      :key="item.id"
                      :label="item.name"
                      :value="item.id"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="sendEnterprise.companyName"
                  size="small"
                  label="派遣公司"
                  :label-width="formLabelWidth"
                  :rules="[
                    {
                      required: true,
                      message: '请选择派遣公司',
                      trigger: 'blur',
                    },
                  ]"
                >
                  <el-select
                    v-model="redactLaborDispatchings.sendEnterprise.companyName"
                    placeholder="请选择"
                    @change="redactChangeSendEnterpriseCompanyName"
                  >
                    <el-option
                      v-for="item in getCompanyName"
                      :key="item.id"
                      :label="item.companyName"
                      :value="item.id"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="6" class="cleanPadding">
                <el-form-item
                  prop="age"
                  label="年龄"
                  size="small"
                  :label-width="formLabelWidth"
                  :rules="[
                    {
                      required: true,
                      message: '请输入年龄段',
                      trigger: 'blur',
                    },
                  ]"
                >
                  <el-input
                    v-model="redactLaborDispatchings.redactAge1"
                    autocomplete="off"
                    style="width: 40%"
                    maxlength="2"
                  ></el-input>
                  ~
                  <el-input
                    v-model="redactLaborDispatchings.redactAge2"
                    autocomplete="off"
                    style="width: 40%"
                    maxlength="2"
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="recruitingNumbers"
                  size="small"
                  label="招聘人数"
                  :label-width="formLabelWidth"
                  :rules="[
                    {
                      required: true,
                      message: '请输入招聘人数',
                      trigger: 'blur',
                    },
                  ]"
                >
                  <el-input
                    v-model="redactLaborDispatchings.recruitingNumbers"
                    autocomplete="off"
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6" class="cleanPadding">
                <el-form-item
                  prop="monthlyWage"
                  size="small"
                  label="月用工工资"
                  :label-width="formLabelWidth"
                  :rules="[
                    {
                      required: true,
                      message: '请输入月用工工资',
                      trigger: 'blur',
                    },
                  ]"
                >
                  <el-input
                    v-model="redactLaborDispatchings.redactMonthlyWage1"
                    autocomplete="off"
                    style="width: 35%"
                    maxlength="4"
                  ></el-input>
                  -
                  <el-input
                    v-model="redactLaborDispatchings.redactMonthlyWage2"
                    autocomplete="off"
                    style="width: 35%"
                    maxlength="4"
                  ></el-input
                  ><span style="margin-left: 5px">(k)</span>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="positionName"
                  label="岗位名称"
                  size="small"
                  :label-width="formLabelWidth"
                  :rules="[
                    {
                      required: true,
                      message: '请输入岗位名称',
                      trigger: 'blur',
                    },
                  ]"
                >
                  <el-input
                    v-model="redactLaborDispatchings.positionName"
                    autocomplete="off"
                  ></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="8">
                <el-form-item
                  prop="sex"
                  label="性别"
                  size="small"
                  :label-width="formLabelWidth"
                  :rules="[
                    { required: true, message: '请选择性别', trigger: 'blur' },
                  ]"
                >
                  <el-radio v-model="redactLaborDispatchings.sex" label="男"
                    >男</el-radio
                  >
                  <el-radio v-model="redactLaborDispatchings.sex" label="女"
                    >女</el-radio
                  >
                  <el-radio
                    v-model="redactLaborDispatchings.sex"
                    label="男女不限"
                    >男女不限</el-radio
                  >
                </el-form-item>
              </el-col>
              <el-col :span="10">
                <el-form-item
                  prop="workTime"
                  size="small"
                  label="工作时间"
                  :label-width="formLabelWidth"
                  :rules="[
                    {
                      required: true,
                      message: '请选择工作时间段',
                      trigger: 'blur',
                    },
                  ]"
                >
                  <el-time-picker
                    is-range
                    style="width: 95%"
                    value-format="HH:mm"
                    format="HH:mm"
                    v-model="redactLaborDispatchings.workTime"
                    range-separator="-"
                    start-placeholder="开始时间"
                    end-placeholder="结束时间"
                    placeholder="选择时间范围"
                  >
                  </el-time-picker>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  label="学历"
                  size="small"
                  :label-width="formLabelWidth"
                  prop="education"
                  :rules="[
                    { required: true, message: '请选择学历', trigger: 'blur' },
                  ]"
                >
                  <el-select
                    v-model="redactLaborDispatchings.education"
                    placeholder="请选择"
                  >
                    <el-option
                       v-for="item in $dictUtils.getDictList('nature')"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="18">
                <el-form-item
                  prop="workAddress"
                  label="工作地址"
                  size="small"
                  :label-width="formLabelWidth"
                  :rules="[
                    {
                      required: true,
                      message: '请输入工作地址',
                      trigger: 'blur',
                    },
                  ]"
                >
                  <el-input
                    v-model="redactLaborDispatchings.workAddress"
                    autocomplete="off"
                    style="width: 97.5%"
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  label="等级评级"
                  size="small"
                  :label-width="formLabelWidth"
                  prop="gradeRatings"
                  :rules="[
                    {
                      required: true,
                      message: '请选择等级评级',
                      trigger: 'blur',
                    },
                  ]"
                >
                  <el-select
                    v-model="redactLaborDispatchings.gradeRatings"
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="item in $dictUtils.getDictList('grade_ratings')"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-form-item
                prop="jobDescription"
                label="岗位描述"
                :label-width="formLabelWidth"
                size="small"
                :rules="[
                  {
                    required: true,
                    message: '请输入岗位描述',
                    trigger: 'blur',
                  },
                ]"
              >
                <el-input
                  v-model="redactLaborDispatchings.jobDescription"
                  autocomplete="off"
                  style="width: 98.2%"
                  type="textarea"
                ></el-input>
              </el-form-item>
            </el-row>
            <el-row>
              <el-form-item
                prop="otherRecruitmentRequirements"
                size="small"
                label="招聘条件"
                :label-width="formLabelWidth"
                :rules="[
                  {
                    required: true,
                    message: '请输入招聘条件',
                    trigger: 'blur',
                  },
                ]"
              >
                <el-input
                  v-model="redactLaborDispatchings.otherRecruitmentRequirements"
                  autocomplete="off"
                  style="width: 98.2%"
                ></el-input>
              </el-form-item>
            </el-row>
            <el-row>
              <el-col :span="6">
                <el-form-item
                  prop="workexperience"
                  label="工作经验(年限)"
                  size="small"
                  :label-width="formLabelWidth"
                  :rules="[
                    {
                      required: true,
                      message: '请输入工作年限',
                      trigger: 'blur',
                    },
                  ]"
                >
                  <el-input
                    v-model="redactLaborDispatchings.workexperience"
                    autocomplete="off"
                    maxlength="2"
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="award"
                  label="奖励金额"
                  size="small"
                  :label-width="formLabelWidth"
                  :rules="[
                    {
                      required: true,
                      message: '请输入奖励金额',
                      trigger: 'blur',
                    },
                  ]"
                >
                  <el-input
                    v-model="redactLaborDispatchings.award"
                    autocomplete="off"
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="groupleader"
                  size="small"
                  label="组长"
                  :label-width="formLabelWidth"
                >
                  <el-select
                    v-model="redactLaborDispatchings.groupleader.name"
                    placeholder="请选择"
                    @change="changeGroupleader"
                  >
                    <el-option
                      v-for="item in getUsers"
                      :key="item.id"
                      :label="item.name"
                      :value="item.id"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="groupLeaderDistributionRatio"
                  size="small"
                  label="组长分配比例(%)"
                  :label-width="formLabelWidth"
                >
                  <el-input
                    v-model="
                      redactLaborDispatchings.groupLeaderDistributionRatio
                    "
                    autocomplete="off"
                  ></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="6">
                <el-form-item
                  prop="postcollector"
                  label="岗位收集员"
                  size="small"
                  :label-width="formLabelWidth"
                >
                  <el-select
                    v-model="redactLaborDispatchings.postcollector.name"
                    placeholder="请选择"
                    @change="changePostcollector"
                  >
                    <el-option
                      v-for="item in getUsers"
                      :key="item.id"
                      :label="item.name"
                      :value="item.id"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="postcollectorDistributionRatio"
                  size="small"
                  label="岗位收集员分配比例(%)"
                  :label-width="formLabelWidth"
                >
                  <el-input
                    v-model="
                      redactLaborDispatchings.postcollectorDistributionRatio
                    "
                    autocomplete="off"
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="negotiation"
                  label="商机洽谈员"
                  size="small"
                  :label-width="formLabelWidth"
                >
                  <el-select
                    v-model="redactLaborDispatchings.negotiation.name"
                    placeholder="请选择"
                    @change="changeNegotiation"
                  >
                    <el-option
                      v-for="item in getUsers"
                      :key="item.id"
                      :label="item.name"
                      :value="item.id"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="negotiationDistributionRatio"
                  size="small"
                  label="商机洽谈员分配比例(%)"
                  :label-width="formLabelWidth"
                >
                  <el-input
                    v-model="
                      redactLaborDispatchings.negotiationDistributionRatio
                    "
                    autocomplete="off"
                  ></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="6">
                <el-form-item
                  prop="recruitment"
                  label="招聘/面试员"
                  size="small"
                  :label-width="formLabelWidth"
                >
                  <el-select
                    v-model="redactLaborDispatchings.recruitment.name"
                    placeholder="请选择"
                    @change="changeRecruitment"
                  >
                    <el-option
                      v-for="item in getUsers"
                      :key="item.id"
                      :label="item.name"
                      :value="item.id"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="recruitmentDistributionRatio"
                  size="small"
                  label="招聘/面试员分配比例(%)"
                  :label-width="formLabelWidth"
                >
                  <el-input
                    v-model="
                      redactLaborDispatchings.recruitmentDistributionRatio
                    "
                    autocomplete="off"
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="businessNegotiation"
                  size="small"
                  label="人才安排员"
                  :label-width="formLabelWidth"
                >
                  <el-select
                    v-model="redactLaborDispatchings.businessNegotiation.name"
                    placeholder="请选择"
                    @change="changeBusinessNegotiation"
                  >
                    <el-option
                      v-for="item in getUsers"
                      :key="item.id"
                      :label="item.name"
                      :value="item.id"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="businessNegotiationDistributionRatio"
                  size="small"
                  label="人才安排员分配比例(%)"
                  :label-width="formLabelWidth"
                >
                  <el-input
                    v-model="
                      redactLaborDispatchings.businessNegotiationDistributionRatio
                    "
                    autocomplete="off"
                  ></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="6">
                <el-form-item
                  label="融资阶段"
                  size="small"
                  :label-width="formLabelWidth"
                  prop="financingStage"
                >
                  <el-select
                    v-model="redactLaborDispatchings.financingStage"
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="item in $dictUtils.getDictList('financing_stage')"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  label="公司规模"
                  size="small"
                  :label-width="formLabelWidth"
                  prop="companySize"
                >
                  <el-select
                    v-model="redactLaborDispatchings.companySize"
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="item in $dictUtils.getDictList('ccompany_size')"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col>
                <el-form-item
                  prop="socialBenefits"
                  label="福利"
                  size="small"
                  :label-width="formLabelWidth"
                  :rules="[
                    { required: true, message: '请选择福利', trigger: 'blur' },
                  ]"
                >
                  <el-checkbox-group
                    v-model="redactLaborDispatchings.socialBenefits"
                  >
                    <el-checkbox
                      v-for="item in getWelfare"
                      :label="item.id"
                      :key="item.id"
                      :value="item.id"
                      >{{ item.title }}</el-checkbox
                    >
                  </el-checkbox-group>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-form-item
                prop="remarks"
                label="备注"
                size="small"
                :label-width="formLabelWidth"
                :rules="[
                  { required: true, message: '请输入备注', trigger: 'blur' },
                ]"
              >
                <el-input
                  v-model="redactLaborDispatchings.remarks"
                  autocomplete="off"
                  style="width: 98.2%"
                ></el-input>
              </el-form-item>
            </el-row>
          </el-form>
          <div slot="footer" class="dialog-footer">
            <el-button @click="redactLaborDispatchingDialog = false"  size="small"
              >取 消</el-button
            >
            <el-button type="primary" @click="confirmRedactLaborDispatching"  size="small"
              >确 定</el-button
            >
          </div>
        </el-dialog>
      </div>

      <!-- 查看劳务派遣信息页面 -->
      <div>
        <el-dialog
          title="查看劳务派遣信息"
          width="60%"
          :visible.sync="lookOverLaborDispatchingDialog"
        >
          <el-form
            ref="lookOverLaborDispatchings"
            :model="lookOverLaborDispatchings"
            class="addEnterpriseRecruitment"
          >
            <el-row>
              <el-col :span="6">
                <el-form-item
                  prop="enterpriseInformation.companyName"
                  size="small"
                  label="企业"
                  :label-width="formLabelWidth"
                >
                  <el-input
                    v-model="
                      lookOverLaborDispatchings.enterpriseInformation
                        .companyName
                    "
                    autocomplete="off"
                    disabled
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="enterpriseUserInformation.userName"
                  label="企业用户"
                  size="small"
                  :label-width="formLabelWidth"
                >
                  <el-input
                    v-model="
                      lookOverLaborDispatchings.enterpriseUserInformation
                        .userName
                    "
                    autocomplete="off"
                    disabled
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="jobtype.name"
                  label="岗位类型 "
                  size="small"
                  :label-width="formLabelWidth"
                >
                  <!-- <el-input
                    v-model="lookOverLaborDispatchings.jobtype.name"
                    autocomplete="off"
                    disabled
                  ></el-input> -->
                  <el-select
                      v-model="lookOverLaborDispatchings.jobtype.name" disabled
                    >
                      <el-option
                        v-for="item in getJobtypeName"
                        :key="item.id"
                        :label="item.name"
                        :value="item.id"
                      ></el-option>
                    </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="sendEnterprise.companyName"
                  size="small"
                  label="派遣公司"
                  :label-width="formLabelWidth"
                >
                  <!-- <el-input
                    v-model="
                      lookOverLaborDispatchings.sendEnterprise.companyName
                    "
                    autocomplete="off"
                    disabled
                  ></el-input> -->
                  <el-select
                      v-model="lookOverLaborDispatchings.sendEnterprise.companyName" disabled
                      placeholder="请选择"
                    >
                      <el-option
                        v-for="item in getCompanyName"
                        :key="item.id"
                        :label="item.companyName"
                        :value="item.id"
                      ></el-option>
                    </el-select>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="6">
                <el-form-item
                  prop="age"
                  label="年龄"
                  size="small"
                  :label-width="formLabelWidth"
                >
                  <el-input
                    v-model="lookOverLaborDispatchings.age"
                    autocomplete="off"
                    disabled
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="recruitingNumbers"
                  size="small"
                  label="招聘人数"
                  :label-width="formLabelWidth"
                >
                  <el-input
                    v-model="lookOverLaborDispatchings.recruitingNumbers"
                    autocomplete="off"
                    disabled
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="monthlyWage"
                  size="small"
                  label="月用工工资"
                  :label-width="formLabelWidth"
                >
                  <el-input
                    v-model="lookOverLaborDispatchings.monthlyWage"
                    autocomplete="off"
                    disabled
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="positionName"
                  label="岗位名称"
                  size="small"
                  :label-width="formLabelWidth"
                >
                  <el-input
                    v-model="lookOverLaborDispatchings.positionName"
                    autocomplete="off"
                    disabled
                  ></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="6">
                <el-form-item
                  prop="sex"
                  label="性别"
                  size="small"
                  :label-width="formLabelWidth"
                >
                  <el-input
                    v-model="lookOverLaborDispatchings.sex"
                    autocomplete="off"
                    disabled
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="workTime"
                  size="small"
                  label="工作时间"
                  :label-width="formLabelWidth"
                >
                  <el-input
                    v-model="lookOverLaborDispatchings.workTime"
                    autocomplete="off"
                    disabled
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  label="学历"
                  size="small"
                  :label-width="formLabelWidth"
                  prop="education"
                >
                   <el-select
                      v-model="lookOverLaborDispatchings.education"
                      disabled
                    >
                      <el-option
                        v-for="item in $dictUtils.getDictList('nature')"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                  <!-- <el-input v-model="lookOverLaborDispatchings.education" autocomplete="off" disabled></el-input> -->
                  <!-- <el-input
                    v-if="lookOverLaborDispatchings.education == 1"
                    value="中专"
                    autocomplete="off"
                    disabled
                  ></el-input>
                  <el-input
                    v-if="lookOverLaborDispatchings.education == 2"
                    value="大专"
                    autocomplete="off"
                    disabled
                  ></el-input>
                  <el-input
                    v-if="lookOverLaborDispatchings.education == 3"
                    value="高中"
                    autocomplete="off"
                    disabled
                  ></el-input>
                  <el-input
                    v-if="lookOverLaborDispatchings.education == 4"
                    value="本科"
                    autocomplete="off"
                    disabled
                  ></el-input>
                  <el-input
                    v-if="lookOverLaborDispatchings.education == 5"
                    value="硕士"
                    autocomplete="off"
                    disabled
                  ></el-input>
                  <el-input
                    v-if="lookOverLaborDispatchings.education == 6"
                    value="博士"
                    autocomplete="off"
                    disabled
                  ></el-input> -->
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  label="等级评级"
                  size="small"
                  :label-width="formLabelWidth"
                  prop="gradeRatings"
                >
                  <el-select
                      v-model="lookOverLaborDispatchings.gradeRatings"
                      disabled
                    >
                      <el-option
                        v-for="item in $dictUtils.getDictList('grade_ratings')"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-form-item
                prop="jobDescription"
                label="岗位描述"
                :label-width="formLabelWidth"
                size="small"
              >
                <el-input
                  v-model="lookOverLaborDispatchings.jobDescription"
                  autocomplete="off"
                  disabled
                  style="width: 98.2%"
                  type="textarea"
                ></el-input>
              </el-form-item>
            </el-row>
            <el-row>
              <el-form-item
                prop="otherRecruitmentRequirements"
                size="small"
                label="招聘条件"
                :label-width="formLabelWidth"
              >
                <el-input
                  v-model="
                    lookOverLaborDispatchings.otherRecruitmentRequirements
                  "
                  autocomplete="off"
                  disabled
                  style="width: 98.2%"
                ></el-input>
              </el-form-item>
            </el-row>
            <el-row>
              <el-col :span="12">
                <el-form-item
                  prop="workAddress"
                  label="工作地址"
                  size="small"
                  :label-width="formLabelWidth"
                >
                  <el-input
                    v-model="lookOverLaborDispatchings.workAddress"
                    autocomplete="off"
                    style="width: 96%"
                    disabled
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="workexperience"
                  label="工作经验(年限)"
                  size="small"
                  :label-width="formLabelWidth"
                >
                  <el-input
                    v-model="lookOverLaborDispatchings.workexperience"
                    autocomplete="off"
                    disabled
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="award"
                  label="奖励金额"
                  size="small"
                  :label-width="formLabelWidth"
                >
                  <el-input
                    v-model="lookOverLaborDispatchings.award"
                    autocomplete="off"
                    disabled
                  ></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="6">
                <el-form-item
                  prop="groupleader.name"
                  size="small"
                  label="组长"
                  :label-width="formLabelWidth"
                >
                  <!-- <el-input
                    v-model="lookOverLaborDispatchings.groupleader.name"
                    autocomplete="off"
                    disabled
                  ></el-input> -->
                  <el-select
                      v-model="lookOverLaborDispatchings.groupleader.name"
                      disabled
                    >
                      <el-option
                        v-for="item in getUsers"
                        :key="item.id"
                        :label="item.name"
                        :value="item.id"
                      ></el-option>
                    </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="groupLeaderDistributionRatio"
                  size="small"
                  label="组长分配比例(%)"
                  :label-width="formLabelWidth"
                >
                  <el-input
                    v-model="
                      lookOverLaborDispatchings.groupLeaderDistributionRatio
                    "
                    autocomplete="off"
                    disabled
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="postcollector.name"
                  label="岗位收集员"
                  size="small"
                  :label-width="formLabelWidth"
                >
                  <!-- <el-input
                    v-model="lookOverLaborDispatchings.postcollector.name"
                    autocomplete="off"
                    disabled
                  ></el-input> -->
                  <el-select
                      v-model="lookOverLaborDispatchings.postcollector.name"
                      disabled
                    >
                      <el-option
                        v-for="item in getUsers"
                        :key="item.id"
                        :label="item.name"
                        :value="item.id"
                      ></el-option>
                    </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="postcollectorDistributionRatio"
                  size="small"
                  label="岗位收集员分配比例(%)"
                  :label-width="formLabelWidth"
                >
                  <el-input
                    v-model="
                      lookOverLaborDispatchings.postcollectorDistributionRatio
                    "
                    autocomplete="off"
                    disabled
                  ></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="6">
                <el-form-item
                  prop="negotiation.name"
                  label="商机洽谈员"
                  size="small"
                  :label-width="formLabelWidth"
                >
                  <!-- <el-input
                    v-model="lookOverLaborDispatchings.negotiation.name"
                    autocomplete="off"
                    disabled
                  ></el-input> -->
                   <el-select
                      v-model="lookOverLaborDispatchings.negotiation.name"
                      disabled
                    >
                      <el-option
                        v-for="item in getUsers"
                        :key="item.id"
                        :label="item.name"
                        :value="item.id"
                      ></el-option>
                    </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="negotiationDistributionRatio"
                  size="small"
                  label="商机洽谈员分配比例(%)"
                  :label-width="formLabelWidth"
                >
                  <el-input
                    v-model="
                      lookOverLaborDispatchings.negotiationDistributionRatio
                    "
                    autocomplete="off"
                    disabled
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="recruitment.name"
                  label="招聘/面试员"
                  size="small"
                  :label-width="formLabelWidth"
                >
                  <!-- <el-input
                    v-model="lookOverLaborDispatchings.recruitment.name"
                    autocomplete="off"
                    disabled
                  ></el-input> -->
                   <el-select
                      v-model="lookOverLaborDispatchings.recruitment.name"
                      disabled
                    >
                      <el-option
                        v-for="item in getUsers"
                        :key="item.id"
                        :label="item.name"
                        :value="item.id"
                      ></el-option>
                    </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="recruitmentDistributionRatio"
                  size="small"
                  label="招聘/面试员分配比例(%)"
                  :label-width="formLabelWidth"
                >
                  <el-input
                    v-model="
                      lookOverLaborDispatchings.recruitmentDistributionRatio
                    "
                    autocomplete="off"
                    disabled
                  ></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="6">
                <el-form-item
                  prop="businessNegotiation.name"
                  size="small"
                  label="人才安排员"
                  :label-width="formLabelWidth"
                >
                  <!-- <el-input
                    v-model="lookOverLaborDispatchings.businessNegotiation.name"
                    autocomplete="off"
                    disabled
                  ></el-input> -->
                   <el-select
                      v-model="lookOverLaborDispatchings.businessNegotiation.name"
                      disabled
                    >
                      <el-option
                        v-for="item in getUsers"
                        :key="item.id"
                        :label="item.name"
                        :value="item.id"
                      ></el-option>
                    </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  prop="businessNegotiationDistributionRatio"
                  size="small"
                  label="人才安排员分配比例(%)"
                  :label-width="formLabelWidth"
                >
                  <el-input
                    v-model="
                      lookOverLaborDispatchings.businessNegotiationDistributionRatio
                    "
                    autocomplete="off"
                    disabled
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  label="融资阶段"
                  size="small"
                  :label-width="formLabelWidth"
                  prop="financingStage"
                >
                  <el-select
                      v-model="lookOverLaborDispatchings.financingStage"
                      disabled
                    >
                      <el-option
                        v-for="item in $dictUtils.getDictList('financing_stage')"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item
                  label="公司规模"
                  size="small"
                  :label-width="formLabelWidth"
                  prop="companySize"
                >
                  <el-select
                      v-model="lookOverLaborDispatchings.companySize"
                      disabled
                    >
                      <el-option
                        v-for="item in $dictUtils.getDictList('ccompany_size')"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      ></el-option>
                    </el-select>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row> </el-row>
            <el-row>
              <el-col :span="24">
                <el-form-item
                  prop="socialBenefits"
                  label="福利"
                  size="small"
                  :label-width="formLabelWidth"
                >
                  <!-- <el-input v-model="lookOverLaborDispatchings.socialBenefits" autocomplete="off"  disabled style="width:96%"></el-input> -->
                  <el-checkbox-group
                    v-model="lookOverLaborDispatchings.socialBenefits"
                  >
                    <el-checkbox
                      v-for="item in getWelfare"
                      :label="item.id"
                      :key="item.id"
                      :value="item.id"
                      disabled
                      >{{ item.title }}</el-checkbox
                    >
                  </el-checkbox-group>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-form-item
                prop="remarks"
                label="备注"
                size="small"
                :label-width="formLabelWidth"
              >
                <el-input
                  v-model="lookOverLaborDispatchings.remarks"
                  autocomplete="off"
                  style="width: 98.2%"
                  disabled
                ></el-input>
              </el-form-item>
            </el-row>
          </el-form>
          <div slot="footer" class="dialog-footer">
            <el-button @click="lookOverLaborDispatchingDialog = false"  size="small"
              >关闭</el-button
            >
          </div>
        </el-dialog>
      </div>

      <div class="contentsBottom">
        <!-- 下半内容五个按钮 -->
        <div>
          <el-button
            size="small"
            type="primary"
            @click="addStatus((status = 1))"
            :disabled="userIds.length != 1"
            >收藏</el-button
          >
          <el-button
            size="small"
            type="warning"
            @click="addStatus((status = 2))"
            :disabled="userIds.length != 1"
            >面试</el-button
          >
          <el-button
            size="small"
            type="success"
            @click="addStatus((status = 4))"
            :disabled="userIds.length != 1"
            >聘用</el-button
          >
          <el-button
            size="small"
            type="danger"
            @click="addStatus((status = 5))"
            :disabled="userIds.length != 1"
            >不合适</el-button
          >
          <el-button
            size="small"
            icon="el-icon-circle-close"
            @click="chooseSelection"
            >取消</el-button
          >
        </div>

        <el-tabs
          type="border-card"
          @tab-click="handleClick"
          v-model="contentsBottom"
          style="margin-top: 20px"
        >
          <el-tab-pane
            v-for="(item, index) in attachedList"
            :key="index"
            :label="item.name"
            :name="item.name"
          >
            <el-table
              :data="attachedListTable"
              ref="attachedListTables"
              size="mini"
              height="calc(100% - 80px)"
              :cell-style="cellStyle"
              style="border: 1px solid #d6cfe2; min-height: 350px"
              :header-cell-class-name="cellHeadStyle"
              :row-class-name="tableRowClassName"
              row-key="id"
              :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
              @selection-change="attachedListChange"
              v-loading="loading"
            >
              <el-table-column
                fixed
                type="selection"
                width="55"
              ></el-table-column>
              <el-table-column
                prop="userInformation.realName"
                label="用户"
                align="center"
                fixed="left"
                width="110"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="phone"
                label="手机号"
                width="120"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="email"
                label="邮箱"
                width="120"
                show-overflow-tooltip
              ></el-table-column>
              <!-- <el-table-column prop="workExperience" label="工作经历"  width="130" show-overflow-tooltip></el-table-column>
                        <el-table-column prop="educationExperience" label="教育经历"  width="110" show-overflow-tooltip></el-table-column> -->
              <el-table-column
                prop="workState"
                label="工作状态"
                width="110"
                show-overflow-tooltip
              >
                <template slot-scope="scope">
                      {{ $dictUtils.getDictLabel("work_state", scope.row.workState, '-') }}
                </template>
              </el-table-column>
              <el-table-column
                prop="workingCity"
                label="期望工作城市"
                width="120"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="workingYears"
                label="工作经验年限"
                width="120"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="careerObjective"
                label="求职意向"
                width="120"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="salaryRequirements"
                label="薪资要求"
                width="110"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="natureOfWork"
                label="工作性质"
                width="110"
                show-overflow-tooltip     
              >
                <template slot-scope="scope">
                      {{ $dictUtils.getDictLabel("nature_of_work", scope.row.natureOfWork, '-') }}
                </template>
              </el-table-column>
              <el-table-column
                prop="expectIndustry.name"
                label="期望行业"
                width="130"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="professionalSkill"
                label="专业技能"
                width="110"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="languageSkills"
                label="语言能力"
                width="130"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="selfEvaluation"
                label="自我评价"
                width="140"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column
                prop="jobSearchingStatus"
                label="求职状态"
                width="140"
                show-overflow-tooltip
              >
                <template slot-scope="scope">
                      {{ $dictUtils.getDictLabel("job_searching_status", scope.row.jobSearchingStatus, '-') }}
                </template>
              </el-table-column>
              <el-table-column
                prop="qualificationList.picture"
                label="资格证"
                width="110"
                show-overflow-tooltip
              >
                <template slot-scope="scope">
                  <el-button
                    size="small"
                    type="success"
                    @click.stop="lookQualificationList(scope.row)"
                    >查看图片</el-button
                  >
                </template>
              </el-table-column>
              <el-table-column
                prop=""
                label="操作"
                width="290"
                show-overflow-tooltip
                fixed="right"
              >
                <template slot-scope="scope">
                  <el-button
                    type="primary"
                    size="mini"
                    @click="
                      addStatusClick(scope.row.userInformation.id, (status = 1))
                    "
                    >收藏</el-button
                  >
                  <el-button
                    type="warning"
                    size="mini"
                    @click="
                      addStatusClick(scope.row.userInformation.id, (status = 2))
                    "
                    >面试</el-button
                  >
                  <el-button
                    type="success"
                    size="mini"
                    @click="
                      addStatusClick(scope.row.userInformation.id, (status = 4))
                    "
                    >聘用</el-button
                  >
                  <el-button
                    type="danger"
                    size="mini"
                    @click="
                      addStatusClick(scope.row.userInformation.id, (status = 5))
                    "
                    >不合适</el-button
                  >
                </template>
              </el-table-column>
            </el-table>
            <el-pagination
              @size-change="attachedListHandleSize"
              @current-change="attachedListHandleCurrent"
              :current-page.sync="attachedListPageNo"
              :page-size="attachedListPageSize"
              layout="total, prev, pager, next, jumper"
              :total="attachedListTotal"
              style="margin: 1rem 0"
            >
            </el-pagination>
          </el-tab-pane>
        </el-tabs>
      </div>
      <!-- 查看资格证 -->
      <el-dialog
        width="40%"
        :visible.sync="qualificationListDialog"
        :title="qualificationListName"
      >
        <img :src="qualificationListImg" style="width: 100%; height: 400px" />
      </el-dialog>
    </div>
  </div>
</template>
<script>
import tableStyles from "../../../../../utils/mixins.js";
export default {
  mixins: [tableStyles],
  data() {
    return {
      loading: "", //所有表格懒加载
      laborDispatchingTable: [], //劳务派遣数据数组
      laborDispatchingPageNo: 1, //页码
      laborDispatchingPageSize: 7, //每页几条
      laborDispatchingTotal: 0, //总条数
      laborDispatchingLoading: "",
      addLaborDispatchingDialog: false, //添加页面默认不显示
      laborDispatchings: {
        companyName: "", //企业
        sendEnterprise: "", //派遣公司
        companyUser: "", //企业用户
        jobtypeName: "", //岗位类型
        positionName: "", //岗位名称
        addMonthlyWage1: "", //前面月用工资
        addMonthlyWage2: "", //后面月用工资
        recruitingNumbers: "", //招聘人数
        sex: "", //性别
        addAge1: "", //前面年龄
        addAge2: "", //后面年龄
        workAddress: "", //工作地址
        workTime: "", //工作时间
        workExperience: "", //工作经验
        jobDescription: "", //岗位描述
        gradeRatings: "", //等级评级
        otherRecruitmentRequirements: "", //其他招聘条件
        education: "", //学历
        award: "", //奖励金额
        groupleaderName: "", //组长
        groupLeaderDistributionRatio: "", //组长分配比例
        postcollectorName: "", //岗位收集员
        postcollectorDistributionRatio: "", //岗位收集员比例
        negotiationName: "", //商机洽谈员
        negotiationDistributionRatio: "", //商机洽谈员分配比例
        recruitmentName: "", //招聘、面试员
        recruitmentDistributionRatio: "", //招聘面试员分配比例
        businessNegotiationName: "", //人才安排员
        businessNegotiationDistributionRatio: "", //人才安排员分配比例
        companysize: "", //公司规模
        financingstage: "", //融资阶段
        socialBenefits: [], //福利待遇
        remarks: "", //备注,
      }, //添加页面数据对象
      formLabelWidth: "100px", //添加页面form表单label宽度
      getCompanyName: [], //用来保存获取到的企业数组对象 ，派遣公司
      getCompanyUser: [], //用来保存获取到的企业用户数组对象
      getJobtypeName: [], //用来保存获取到的岗位类型数组对象
      getUsers: [], //用来保存获取到的用户数组对象
      getWelfare: [], ////用来保存获取到的福利数组对象
      checkGetCompanyName: "", //添加页面企业改变后的id，编辑页面企业id

      checkJobtypeName: "", //编辑页面岗位类型改变后的id
      checkUserName: "", //编辑页面企业用户id
      checkSendEnterpriseCompanyName: "", //编辑页面派遣公司id
      getChangeGroupleader: "", //编辑页面组长改变后的id
      getChangePostcollector: "", //编辑页面岗位收集员改变后的id
      getChangeNegotiation: "", //编辑页面商机洽谈员改变后的id
      getChangeRecruitment: "", //编辑页面招聘/面试员改变后的id
      getChangeBusinessNegotiation: "", //编辑页面人才安排员改变后的id

      recruitmentInformationId: "", //招聘信息id，单个
      recruitCheckArray: [], //选中的行数组，
      redactLaborDispatchingDialog: false, //编辑页面默认不显示
      getInitialTime: "", //用来保存编辑刚进来得到的时间-格式
      redactLaborDispatchings: {
        //编辑页面数据对象
        enterpriseInformation: {
          companyName: "",
        }, //企业
        enterpriseUserInformation: {
          userName: "",
        }, //企业用户
        jobtype: {
          name: "",
        }, //岗位类型
        sendEnterprise: {
          companyName: "",
        }, //派遣公司
        positionName: "", //岗位名称
        redactMonthlyWage1: "", //前面月用工工资
        redactMonthlyWage2: "", //后面月用工工资
        recruitingNumbers: "", //招聘人数
        sex: "", //性别
        age: "",
        redactAge1: "", //前面年龄
        redactAge2: "", //后面年龄
        workAddress: "", //工作地址
        workTime: "", //工作时间
        workTimes: [], //工作时间

        workExperience: "", //工作经验
        jobDescription: "", //岗位描述
        gradeRatings: "", //等级评级
        otherRecruitmentRequirements: "", //其他招聘条件
        education: "", //学历
        award: "", //奖励金额
        groupleader: {
          name: "",
        }, //组长
        groupLeaderDistributionRatio: "", //组成长分配比例
        postcollector: {
          name: "",
        }, //岗位收集员
        postcollectorDistributionRatio: "", //岗位收集员分配比例
        negotiation: {
          name: "",
        }, //商机洽谈员
        negotiationDistributionRatio: "", //商机洽谈员分配比例
        recruitment: {
          name: "",
        }, //招聘、面试员
        recruitmentDistributionRatio: "", //招聘面试员分配比例
        businessNegotiation: {
          name: "",
        }, //人才安排员
        businessNegotiationDistributionRatio: "", //人才安排员分配比例
        companySize: "", //公司规模
        financingStage: "", //融资阶段
        socialBenefits: [], //福利待遇
        remarks: "", //备注,
      },

      lookOverLaborDispatchingDialog: false, //查看页面默认不显示
      lookOverLaborDispatchings: {
        enterpriseInformation: {
          companyName: "",
        }, //企业
        enterpriseUserInformation: {
          userName: "",
        }, //企业用户
        jobtype: {
          name: "",
        }, //岗位类型
        sendEnterprise: {
          companyName: "",
        }, //派遣公司
        positionName: "", //岗位名称
        monthlyWage: "", //月用工资
        monthlyWage1: "",
        recruitingNumbers: "", //招聘人数
        sex: "", //性别
        age: "", //年龄
        workAddress: "", //工作地址
        workTime: "", //工作时间
        workexperience: "", //工作经验
        jobDescription: "", //岗位描述
        gradeRatings: "", //等级评级
        otherRecruitmentRequirements: "", //其他招聘条件
        education: "", //学历
        award: "", //奖励金额
        groupleader: {
          name: "",
        }, //组长
        groupLeaderDistributionRatio: "", //组成长分配比例
        postcollector: {
          name: "",
        }, //岗位收集员
        postcollectorDistributionRatio: "", //岗位收集员分配比例
        negotiation: {
          name: "",
        }, //商机洽谈员
        negotiationDistributionRatio: "", //商机洽谈员分配比例
        recruitment: {
          name: "",
        }, //招聘、面试员
        recruitmentDistributionRatio: "", //招聘面试员分配比例
        businessNegotiation: {
          name: "",
        }, //人才安排员
        businessNegotiationDistributionRatio: "", //人才安排员分配比例
        companySize: "", //公司规模
        financingStage: "", //融资阶段
        socialBenefits: [], //福利待遇
        remarks: "", //备注,
      }, //查看劳务派遣信息

      //附表tab
      attachedList: [
        { name: "待处理" },
        { name: "有意向" },
        { name: "已发面试" },
        { name: "已面试" },
        { name: "已聘用" },
        { name: "不合适" },
      ],
      contentsBottom: "待处理", //tab选项卡
      statusCode: 0,
      attachedListTable: [], //附表数据数组
      attachedListPageNo: 1, //页码
      attachedListPageSize: 7, //每页几条
      attachedListTotal: 0, //总条数
      qualificationListDialog: false, //查看资格证图片默认false
      qualificationListImg: "", //查看资格证图片路径
      qualificationListName: "",
      userID: "", //改变状态时选中的用户id
      userIds: [], //保存改变状态选中的用户id数组
    };
  },
  mounted() {
    this.getLaborDispatching();
  },
  methods: {
    //
    recruit(url) {
      this.$router.push(url);
    },
    //劳务派遣翻页
    laborDispatchingHandleSize(val) {
      this.laborDispatchingPageSize = val;
      this.laborDispatchingPageNo = 1;
      this.getLaborDispatching();
    },
    laborDispatchingHandleCurrent(val) {
      this.laborDispatchingPageNo = val;
      this.getLaborDispatching();
    },
    //劳务派遣列表接口
    getLaborDispatching() {
      this.laborDispatchingLoading = true;
      this.$http({
        url: "/dlyrl/hr/agrecruit/findByType",
        method: "get",
        params: {
          //一定要设置name，才可以传params
          pageNo: this.laborDispatchingPageNo,
          pageSize: this.laborDispatchingPageSize,
          recruitmentType: 3,
        },
      }).then(({ data }) => {
        // console.log(data)
        if (data && data.success) {
          this.laborDispatchingTable = data.recruitmentList;
          if (this.laborDispatchingTable.length == 0) {
            this.laborDispatchingTotal = 0;
          } else {
            this.laborDispatchingTotal = data.totalCount;
          }
          this.laborDispatchingLoading = false;
        }
      });
    },
    //顶部选项卡发生变化时
    laborDispatchingChange(vals) {
      this.recruitCheckArray = [];
      this.recruitCheckArray = vals;
      vals.forEach((val, index) => {
        this.lookOverLaborDispatchings = val; //查看招聘数据
        this.recruitmentInformationId = val.id;
        this.getAttachedList();
      });
      //如果数组为空，说明都未选中，清除数据
      if (this.recruitCheckArray.length == 0) {
        this.attachedListTable = [];
      }
    },
    //添加按钮
    laborDispatchingDialog() {
      this.addLaborDispatchingDialog = true;
      this.getCompanyUser = [];
      this.getEnterprise();
      this.getPostType();
      this.getEnterpriseUser();
      this.getUser();
      this.getBenefits();
    },
    //添加页面得到企业,派遣公司的查询接口
    getEnterprise() {
      this.$http({
        url: "/dlyrl/hr/agrecruit/getEnterprise",
        method: "get",
      }).then(({ data }) => {
        // console.log(data,'企业')
        if (data && data.success) {
          this.getCompanyName = data.enterpriseInformationList;
        }
      });
    },
    //添加页面得到岗位类型的查询接口
    getPostType() {
      this.$http({
        url: "/dlyrl/hr/agrecruit/findJob",
        method: "get",
      }).then(({ data }) => {
        // console.log(data,'岗位类型')
        if (data && data.success) {
          this.getJobtypeName = data.jobClassifications;
        }
      });
    },
    //添加页面得到企业用户的查询接口
    getEnterpriseUser() {
      if (this.checkGetCompanyName.length != 0) {
        this.$http({
          url: "/dlyrl/hr/agrecruit/getEnterpriseUser",
          method: "get",
          params: {
            enterpriseId: this.checkGetCompanyName,
          },
        }).then(({ data }) => {
          // console.log(data,'企业用户')
          if (data && data.success) {
            this.getCompanyUser = data.enterpriseUserInformationList;
          }
        });
      } else {
        this.getCompanyUser = [];
      }
    },
    //添加页面得到系统用户的查询接口
    getUser() {
      this.$http({
        url: "/dlyrl/hr/agrecruit/getUser",
        method: "get",
      }).then(({ data }) => {
        // console.log(data,'系统用户')
        if (data && data.success) {
          this.getUsers = data.userList;
        }
      });
    },
    //添加页面得到福利待遇的查询接口
    getBenefits() {
      this.$http({
        url: "/dlyrl/hr/agrecruit/getBenefits",
        method: "get",
      }).then(({ data }) => {
        // console.log(data,'福利待遇')
        if (data && data.success) {
          this.getWelfare = data.socialBenefitsList;
        }
      });
    },
    //添加企业改变时
    changeCompanyName(val) {
      this.laborDispatchings.companyUser = ""; //清除之前企业用户选中值
      this.checkGetCompanyName = val;
      this.getEnterpriseUser();
    },
    //添加弹出页面取消按钮
    addCancelLaborDispatching() {
      this.addLaborDispatchingDialog = false;
      this.$refs["laborDispatchings"].resetFields();
    },
    //添加弹出页面确认按钮
    confirmAddLaborDispatching() {
      if (this.laborDispatchings.workTime.length == 0) {
        this.laborDispatchings.workTime = "";
      } else {
        this.laborDispatchings.workTime =
          this.laborDispatchings.workTime.join("-");
      }
      if (
        this.laborDispatchings.addMonthlyWage1.length != 0 &&
        this.laborDispatchings.addMonthlyWage2.length != 0
      ) {
        this.monthlyWage =
          this.laborDispatchings.addMonthlyWage1 +
          "-" +
          this.laborDispatchings.addMonthlyWage2 +
          "k";
      } else {
        this.monthlyWage = "";
      }
      if (
        this.laborDispatchings.addAge1.length != 0 &&
        this.laborDispatchings.addAge2 != 0
      ) {
        this.age =
          this.laborDispatchings.addAge1 + "~" + this.laborDispatchings.addAge2;
      } else {
        this.age = "";
      }
      this.$http({
        url: "/dlyrl/hr/agrecruit/saveJobInformationByType",
        method: "post",
        params: {
          recruitmentType: 3,
          enterpriseInformation: this.laborDispatchings.companyName,
          enterpriseUserInformation: this.laborDispatchings.companyUser,
          monthlyWage: this.monthlyWage,
          recruitingNumbers: this.laborDispatchings.recruitingNumbers,
          positionName: this.laborDispatchings.positionName,
          workAddress: this.laborDispatchings.workAddress,
          workTime: this.laborDispatchings.workTime,
          jobDescription: this.laborDispatchings.jobDescription,
          sex: this.laborDispatchings.sex,
          age: this.age,
          otherRecruitmentRequirements:
            this.laborDispatchings.otherRecruitmentRequirements,
          socialBenefits: this.laborDispatchings.socialBenefits.join(","),
          jobtype: this.laborDispatchings.jobtypeName,
          education: this.laborDispatchings.education,
          award: this.laborDispatchings.award,
          groupleader: this.laborDispatchings.groupleaderName,
          groupLeaderDistributionRatio:
            this.laborDispatchings.groupLeaderDistributionRatio,
          postcollector: this.laborDispatchings.postcollectorName,
          postcollectorDistributionRatio:
            this.laborDispatchings.postcollectorDistributionRatio,
          negotiation: this.laborDispatchings.negotiationName,
          negotiationDistributionRatio:
            this.laborDispatchings.negotiationDistributionRatio,
          recruitment: this.laborDispatchings.recruitmentName,
          recruitmentDistributionRatio:
            this.laborDispatchings.recruitmentDistributionRatio,
          businessNegotiation: this.laborDispatchings.businessNegotiationName,
          businessNegotiationDistributionRatio:
            this.laborDispatchings.businessNegotiationDistributionRatio,
          financingStage: this.laborDispatchings.financingstage,
          companySize: this.laborDispatchings.companysize,
          workexperience: this.laborDispatchings.workExperience,
          sendEnterprise: this.laborDispatchings.sendEnterprise,
          remarks: this.laborDispatchings.remarks,
          gradeRatings: this.laborDispatchings.gradeRatings,
        },
      }).then(({ data }) => {
        // console.log(data,'添加招聘')
        if (data && data.success) {
          this.$message({
            type: "success",
            message: data.msg,
          });
          this.getLaborDispatching();
          this.addLaborDispatchingDialog = false;
          this.$refs["laborDispatchings"].resetFields();
          this.laborDispatchings.addMonthlyWage1 = "";
          this.laborDispatchings.addMonthlyWage2 = "";
          this.laborDispatchings.addAge1 = "";
          this.laborDispatchings.addAge2 = "";
          this.laborDispatchings.sendEnterprise = "";
          this.laborDispatchings.socialBenefits = "";
        }
      });
    },

    //顶部编辑按钮
    redactLaborDispatching() {
      //判断选择行几行，只能选中一行
      // console.log(this.recruitCheckArray)
      if (this.recruitCheckArray.length == 1) {
        this.getPostType();
        this.getUser();
        this.getBenefits();
        this.getEnterprise();
        this.redactLaborDispatchingDialog = true;
        //编辑时 查询内容接口
        this.$http({
          url: "/dlyrl/hr/agrecruit/findById",
          method: "get",
          params: {
            id: this.recruitmentInformationId,
          },
        }).then(({ data }) => {
          // console.log(data,'企业用户详情查询');
          if (data && data.success) {
            this.redactLaborDispatchings = data.recruitment;
            var redactAge = this.redactLaborDispatchings.age; //得到年龄  下面操作回显专用
            this.$set(
              this.redactLaborDispatchings,
              "redactAge1",
              redactAge.split("~")[0]
            ); //年龄第一个input
            this.$set(
              this.redactLaborDispatchings,
              "redactAge2",
              redactAge.split("~")[1]
            ); //年龄第二个input
            var redactMonthlyWage = this.redactLaborDispatchings.monthlyWage; //得到月用工资  下面操作回显专用
            this.$set(
              this.redactLaborDispatchings,
              "redactMonthlyWage1",
              redactMonthlyWage.split("-")[0]
            ); //工资第一个input
            this.$set(
              this.redactLaborDispatchings,
              "redactMonthlyWage2",
              redactMonthlyWage.split("-")[1]
            ); //工资第二个input
            this.redactLaborDispatchings.redactMonthlyWage2 =
              this.redactLaborDispatchings.redactMonthlyWage2.substr(
                0,
                this.redactLaborDispatchings.redactMonthlyWage2.length - 1
              ); //把k切割掉
            var getReturnBenefitsRedact =
              this.redactLaborDispatchings.socialBenefits; //得到返回的福利待遇
            this.redactLaborDispatchings.socialBenefits =
              getReturnBenefitsRedact.split(","); //变成数组进行默认选中
            //得到工作时间
            this.getInitialTime = this.redactLaborDispatchings.workTime;
            //切割得到自己想要的类型，专用设置默认时间
            var firstWorkTime =
              this.redactLaborDispatchings.workTime.split("-")[0];
            var firstWorkTime1 = firstWorkTime.split(":")[0];
            var firstWorkTime2 = firstWorkTime.split(":")[1];
            var secondWorkTime =
              this.redactLaborDispatchings.workTime.split("-")[1];
            var secondWorkTime1 = secondWorkTime.split(":")[0];
            var secondWorkTime2 = secondWorkTime.split(":")[1];
            this.redactLaborDispatchings.workTime = [
              new Date("", "", "", firstWorkTime1, firstWorkTime2),
              new Date("", "", "", secondWorkTime1, secondWorkTime2),
            ]; //初始时间值
            //编辑时企业和企业用户无法改变，直接赋原来的值
            this.checkGetCompanyName =
              this.redactLaborDispatchings.enterpriseInformation.id;
            this.checkUserName =
              this.redactLaborDispatchings.enterpriseInformation.id;
          }
        });
      } else {
        this.$message({
          type: "success",
          message: "请选择一条信息",
        });
      }
    },
    //编辑岗位类型改变时
    redactChangeJobtypeName(val) {
      this.checkJobtypeName = val;
    },
    //派遣公司改变时
    redactChangeSendEnterpriseCompanyName(val) {
      this.checkSendEnterpriseCompanyName = val;
    },
    //组长改变时
    changeGroupleader(val) {
      this.getChangeGroupleader = val;
    },
    //岗位收集员改变时
    changePostcollector(val) {
      this.getChangePostcollector = val;
    },
    //商机洽谈员改变时
    changeNegotiation(val) {
      this.getChangeNegotiation = val;
    },
    //招聘/面试员改变时
    changeRecruitment(val) {
      this.getChangeRecruitment = val;
    },
    //人才安排员改变时
    changeBusinessNegotiation(val) {
      this.getChangeBusinessNegotiation = val;
    },
    //编辑页面确认按钮
    confirmRedactLaborDispatching() {
      //判断时间是否跟改，给不同的格式
      if (this.redactLaborDispatchings.workTime.join("-").length > 11) {
        this.redactLaborDispatchings.workTime = this.getInitialTime;
      } else {
        this.redactLaborDispatchings.workTime =
          this.redactLaborDispatchings.workTime.join("-");
      }
      //判断下拉选是否改变，未改变继承查询到的，改变用改变的
      if (this.checkJobtypeName.length == 0) {
        this.checkJobtypeName = this.redactLaborDispatchings.jobtype.id;
      }
      if (this.checkSendEnterpriseCompanyName.length == 0) {
        this.checkSendEnterpriseCompanyName =
          this.redactLaborDispatchings.sendEnterprise.id;
      }
      if (this.getChangeGroupleader.length == 0) {
        this.getChangeGroupleader = this.redactLaborDispatchings.groupleader.id;
      }
      if (this.getChangePostcollector.length == 0) {
        this.getChangePostcollector =
          this.redactLaborDispatchings.postcollector.id;
      }
      if (this.getChangeNegotiation.length == 0) {
        this.getChangeNegotiation = this.redactLaborDispatchings.negotiation.id;
      }
      if (this.getChangeRecruitment.length == 0) {
        this.getChangeRecruitment = this.redactLaborDispatchings.recruitment.id;
      }
      if (this.getChangeBusinessNegotiation.length == 0) {
        this.getChangeBusinessNegotiation =
          this.redactLaborDispatchings.businessNegotiation.id;
      }
      this.$http({
        url: "/dlyrl/hr/agrecruit/updJobInformationByType",
        method: "post",
        params: {
          recruitmentType: 3, //类型
          id: this.recruitmentInformationId, //招聘信息id
          enterpriseInformation: this.checkGetCompanyName,
          enterpriseUserInformation: this.checkUserName,
          jobtype: this.checkJobtypeName,
          sendEnterprise: this.checkSendEnterpriseCompanyName,
          age:
            this.redactLaborDispatchings.redactAge1 +
            "~" +
            this.redactLaborDispatchings.redactAge2,
          recruitingNumbers: this.redactLaborDispatchings.recruitingNumbers,
          monthlyWage:
            this.redactLaborDispatchings.redactMonthlyWage1 +
            "-" +
            this.redactLaborDispatchings.redactMonthlyWage2 +
            "k",
          positionName: this.redactLaborDispatchings.positionName,
          workAddress: this.redactLaborDispatchings.workAddress,
          workTime: this.redactLaborDispatchings.workTime,
          jobDescription: this.redactLaborDispatchings.jobDescription,
          sex: this.redactLaborDispatchings.sex,
          otherRecruitmentRequirements:
            this.redactLaborDispatchings.otherRecruitmentRequirements,
          socialBenefits: this.redactLaborDispatchings.socialBenefits.join(","),
          education: this.redactLaborDispatchings.education,
          award: this.redactLaborDispatchings.award,
          groupleader: this.getChangeGroupleader,
          groupLeaderDistributionRatio:
            this.redactLaborDispatchings.groupLeaderDistributionRatio,
          postcollector: this.getChangePostcollector,
          postcollectorDistributionRatio:
            this.redactLaborDispatchings.postcollectorDistributionRatio,
          negotiation: this.getChangeNegotiation,
          negotiationDistributionRatio:
            this.redactLaborDispatchings.negotiationDistributionRatio,
          recruitment: this.getChangeRecruitment,
          recruitmentDistributionRatio:
            this.redactLaborDispatchings.recruitmentDistributionRatio,
          businessNegotiation: this.getChangeBusinessNegotiation,
          businessNegotiationDistributionRatio:
            this.redactLaborDispatchings.businessNegotiationDistributionRatio,
          financingStage: this.redactLaborDispatchings.financingStage,
          companySize: this.redactLaborDispatchings.companySize,
          workexperience: this.redactLaborDispatchings.workexperience,
          remarks: this.redactLaborDispatchings.remarks,
          gradeRatings: this.redactLaborDispatchings.gradeRatings,
        },
      }).then(({ data }) => {
        // console.log(data,'修改招聘');
        if (data && data.success) {
          this.$message({
            type: "success",
            message: data.msg,
          });
          this.getLaborDispatching();
          this.redactLaborDispatchingDialog = false;
        }
      });
    },
    //顶部删除按钮
    lookOverLaborDispatchingsDel() {
      let ids = this.recruitCheckArray
        .map((item) => {
          // console.log(item.id)
          return item.id;
        })
        .join(",");
      this.$confirm(`确定删除所选项吗?`, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(() => {
        this.$http({
          url: "/dlyrl/hr/agrecruit/delJobInformationByType",
          method: "post",
          params: { recruitmentInformationId: ids, recruitmentType: 3 },
        }).then(({ data }) => {
          if (data && data.success) {
            this.$message.success(data.msg);
            this.getLaborDispatching();
          }
        });
      });
    },
    //查看按钮
    lookOverLaborDispatching(rows) {
        this.getBenefits()
        this.lookOverLaborDispatchingDialog = true;
        this.lookOverLaborDispatchings = rows;//变成数组进行默认选中
        var getReturnBenefits = this.lookOverLaborDispatchings.socialBenefits;
        this.lookOverLaborDispatchings.socialBenefits = getReturnBenefits.split(","); //变成数组进行默认选中
    },
    // lookOverLaborDispatching() {
    //   if (this.recruitCheckArray.length == 1) {
    //     this.lookOverLaborDispatchingDialog = true;
    //     this.getBenefits();
    //     var getReturnBenefits = this.lookOverLaborDispatchings.socialBenefits; //得到返回的福利待遇
    //     this.lookOverLaborDispatchings.socialBenefits =
    //       getReturnBenefits.split(","); //变成数组进行默认选中
    //   } else {
    //     this.$message({
    //       type: "success",
    //       message: "请选择一条信息",
    //     });
    //   }
    // },
    //顶部取消按钮
    toggleTopSelection(rows) {
      // this.$refs.laborDispatchingTable.clearSelection();
      if (rows) {
        rows.forEach((row) => {
          this.$refs.laborDispatchingTable.toggleRowSelection(row);
        });
      } else {
        this.$refs.laborDispatchingTable.clearSelection();
      }
    },

    //tab选项卡
    handleClick(tab, event) {
      if (this.recruitCheckArray.length == 1) {
        switch (this.contentsBottom) {
          case "待处理":
            this.statusCode = 0;
            break;
          case "有意向":
            this.statusCode = 1;
            break;
          case "已发面试":
            this.statusCode = 2;
            break;
          case "已面试":
            this.statusCode = 3;
            break;
          case "已聘用":
            this.statusCode = 4;
            break;
          case "不合适":
            this.statusCode = 5;
            break;
          default:
            this.statusCode = 0;
            break;
        }
        this.getAttachedList();
      }
    },
    //附表翻页
    attachedListHandleSize(val) {
      this.attachedListPageSize = val;
      this.attachedListPageNo = 1;
      this.getAttachedList();
    },
    attachedListHandleCurrent(val) {
      this.attachedListPageNo = val;
      this.getAttachedList();
    },
    //附表选项卡发生变化时
    attachedListChange(value) {
      this.userIds = value;
    },
    //根据状态不同，查询不同
    getAttachedList() {
      this.loading = true;
      this.$http({
        url: "/dlyrl/hr/agrecruit/getResume",
        method: "get",
        params: {
          //一定要设置name，才可以传params
          pageNo: this.attachedListPageNo,
          pageSize: this.attachedListPageSize,
          employmentStatus: this.statusCode,
          recruitmentInformationId: this.recruitmentInformationId,
        },
      }).then(({ data }) => {
        // console.log(data);
        if (data && data.success) {
          this.attachedListTable = data.resumeInformations;
          if (this.attachedListTable.length == 0) {
            this.attachedListTotal = 0;
          } else {
            this.attachedListTotal = data.totalCount;
          }
          this.loading = false;
        }
      });
    },
    //查看资格证图片
    lookQualificationList(e) {
      if (e.qualificationList.length != 0) {
        this.qualificationListDialog = true;
        this.qualificationListImg = e.qualificationList[0].picture; //图片路径
        this.qualificationListName = e.qualificationList[0].qualificationName; //标题名字
      } else {
        this.$message({
          type: "warning",
          message: "暂无资格证",
        });
      }
    },
    //改变状态接口
    changeStatus() {
      this.$http({
        url: "/dlyrl/hr/agrecruit/updateByRecruitmentAndUser",
        method: "post",
        params: {
          //一定要设置name，才可以传params
          employmentStatus: this.status,
          recruitmentInformationId: this.recruitmentInformationId,
          userInformationId: this.userID,
        },
      }).then(({ data }) => {
        // console.log(data);
        if (data && data.success) {
          this.$message({
            message: data.msg,
            type: "success",
          });
          this.getAttachedList();
        }
      });
    },
    //附表按钮事件
    addStatus(status) {
      this.userID = this.userIds[0].userInformation.id;
      switch (status) {
        case 1:
          this.status = 1;
          break;
        case 2:
          this.status = 2;
          break;
        case 4:
          this.status = 4;
          break;
        case 5:
          this.status = 5;
          break;
        default:
          this.status = 0;
          break;
      }
      this.changeStatus();
    },
    //取消按钮
    chooseSelection() {
      this.$refs.attachedListTables[0].clearSelection();
      this.$refs.attachedListTables[1].clearSelection();
      this.$refs.attachedListTables[2].clearSelection();
      this.$refs.attachedListTables[3].clearSelection();
      this.$refs.attachedListTables[4].clearSelection();
      this.$refs.attachedListTables[5].clearSelection();
    },
    //当前行操作的事件
    addStatusClick(id, status) {
      this.userID = id;
      switch (status) {
        case 1:
          this.status = 1;
          break;
        case 2:
          this.status = 2;
          break;
        case 4:
          this.status = 4;
          break;
        case 5:
          this.status = 5;
          break;
        default:
          this.status = 0;
          break;
      }
      this.changeStatus();
    },
  },
};
</script>
<style scoped>
.addEnterpriseRecruitment .el-input {
  width: 90%;
}
.cleanPadding .el-input--mini .el-input__inner {
  padding-right: 0 !important;
}
ul {
  margin: 0;
}
</style>